'''
@Author: your name
@Date: 2020-02-03 09:15:37
@LastEditTime : 2020-02-05 20:55:49
@LastEditors  : Please set LastEditors
@Description: In User Settings Edit
@FilePath: \pyqt5\demo_016_QObject.py
'''

from PyQt5.Qt import *


class Window(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle('demo_016_QObject')
        self.resize(500, 500)
        self.setup_ui()

    def setup_ui(self):
        self.GetParentOfQObject()
    
    def GetParentOfQObject(self):
        # mro()  is get parent object
        mros = QObject.mro()
        for item in mros:
            print(item)


if __name__ == '__main__':
    import sys
    app = QApplication(sys.argv)

    win = Window()
    win.show()

    sys.exit(app.exec_())
